<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>${site.name}后台</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="${base}/static/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="${base}/static/css/login.css?t=${.now?long}" media="all" />
    <style type="text/css">
        html, body {
		  width: 100%;
		  height: 100%;
		  overflow: hidden;
		}
		body {
		  background-image: url(${base}/static/images/loginbg.jpg);
		  font-family: 'Montserrat', sans-serif;
		  color: #fff;
		  line-height: 1.3;
		  -webkit-font-smoothing: antialiased;
		}
        .login {
        	border:1px solid grey;
        	border-radius:10px;
        }
        
        #particles {
		  width: 100%;
		  height: 100%;
		  overflow: hidden;
		}
        
        .copyright {
        	position:absolute;
        	bottom:20px;
        	width:100%;
        	text-align:center;
        	font-size:14px;
        	color:#fff;
        	  }
    </style>
</head>
<body>
<!--<div class="video_mask"></div>-->
<div class="login">
    <h1 style="color:grey">${site.name}后台</h1>
    <form class="layui-form" action="${base}${adminPrefix}/login/main" method="post">
        <div class="layui-form-item">
            <input class="layui-input" value="" name="username" placeholder="用户名" lay-verify="required" type="text" autocomplete="off">
        </div>
        <div class="layui-form-item">
            <input class="layui-input" value="" name="password" placeholder="密码" lay-verify="required" type="password" autocomplete="off">
        </div>
        <div class="layui-form-item form_code">
            <input class="layui-input" name="code" placeholder="验证码" lay-verify="required" type="text" autocomplete="off">
            <div class="code"><img src="${base}${adminPrefix}/genCaptcha" width="116" height="36" id="mycode"></div>
        </div>
        <div class="layui-form-item" style="display:none;">
            <input type="checkbox" name="rememberMe" value="true" lay-skin="primary" checked title="记住帐号?">
        </div>
        <button class="layui-btn login_btn" lay-submit="" lay-filter="login" style="background-color:#1686ab;border:1px solid #fff;">登录</button>
        <div style="font-size:14px;margin-top:20px;"><a style="color:green;" href="https://www.google.cn/intl/zh-CN/chrome/" target="_blank">* 建议使用Google Chrome浏览器</a></div>
    </form>
</div>

<div class="copyright"><a style="color:#fff" href="http://www.beian.miit.gov.cn/">${site.powerby}</a></div>
</div>
<script type="text/javascript" src="${base}/static/layui/layui.js"></script>

<script type="text/javascript" src="${base}/static/js/jquery.min.js"></script>
<script type="text/javascript" src="${base}/static/js/jquery.particleground.min.js"></script>
<script>
    layui.use(['layer', 'form'], function() {
        var layer = layui.layer,
                $ = layui.jquery,
                form = layui.form;

        $("#mycode").on('click',function(){
            var t = Math.random();
            $("#mycode")[0].src="${base}${adminPrefix}/genCaptcha?t= "+t;
        });

        form.on('submit(login)', function(data) {
            var loadIndex = layer.load(2, {
                shade: [0.3, '#333']
            });
            if($('form').find('input[type="checkbox"]')[0].checked){
                data.field.rememberMe = true;
            }else{
                data.field.rememberMe = false;
            }
            $.post(data.form.action, data.field, function(res) {
                layer.close(loadIndex);
                if(res.success){
                    location.href="${base}${adminPrefix}/"+res.data.url;
                }else{
                    layer.msg(res.message);
                    $("#mycode").click();
                }
            });
            return false;
        });
    });
</script>
</body>
</html>